package top.sdaily.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.sdaily.core.mybatis.BaseMapper;
import top.sdaily.web.dto.DRoleMenu;
import top.sdaily.web.model.Menu;

import java.util.List;

/**
 * Created by soya on 2016/10/28.
 */
@Mapper
public interface MenuMapper extends BaseMapper<Menu> {

    List<Menu> findChildren(String parentId);

    List<Menu> findTree(String parentId);

    List<DRoleMenu> findByRole(@Param("roleId") String roleId,@Param("parentId") String parentId);

}
